package com.distributed.common;

public final class Constant {
//message define	
	public final static int BASE_MESSAGE = 0;
	public final static String BASE_MESSAGE_NAME = "baseMessage";
	
	public final static int LOGIN_MESSAGE = 1;
	public final static String LOGIN_MESSAGE_NAME = "loginMessage"; 
	
	public final static int CREATEROOM_MESSAGE = 2;
	public final static String CREATEROOM_MESSAGE_NAME = "createRoomMessage";
	
	public final static int READY_MESSAGE = 3;
	public final static String READY_MESSAGE_NAME = "readyMessage";
	
	public final static int START_MESSAGE = 4;
	public final static String START_MESSAGE_NAME = "startMessage";
	
	public final static int CANCEL_MESSAGE = 5;
	public final static String CANCEL_MESSAGE_NAME = "cancelMessage";
	
	public final static int ASK_MESSAGE = 6;
	public final static String ASK_MESSAGE_NAME = "askMessage";
	
	public final static int QUIT_MESSAGE = 7;
	public final static String QUIT_MESSAGE_NAME = "quitMessage";
	
	public final static int PING_MESSAGE = 8;
	public final static String PING_MESSAGE_NAME = "pingMessage";
	
	public final static int ENTER_ROOM_MESSAGE = 9;
	public final static String ENTER_ROOM_MESSAGE_NAME = "enterRoomMessage";
	
	public final static int GET_LOGINSERV_MESSAGE = 10;
	public final static String GET_LOGINSERV_MESSAGE_NAME = "getloginServMessage";
	
	public final static int LOGIN_SERVINFO_MESSAGE = 11;
	public final static String LOGIN_SERVINFO_MESSAGE_NAME = "loginServMessage";
	
	public final static int LOGIC_SERVINFO_MESSAGE = 12;
	public final static String LOGIC_SERVINFO_MESSAGE_NAME = "logicServMessage";

	public final static int LOGOUT_MESSAGE = 13;
	public final static String LOGOUT_MESSAGE_NAME = "logoutMessage";
	
	public final static int LOGOUT_RESP_MESSAGE = 14;
	public final static String LOGOUT_RESP_MESSAGE_NAME = "logoutRespMessage";
	
	public final static int ERROR_MESSAGE = 15;
	public final static String ERROR_MESSAGE_NAME = "errorMessage";
	
	public final static int LEAVE_NOTIFY_MESSAGE = 16;
	public final static String LEAVE_NOTIFY_MESSAGE_NAME = "leaveNotifyMessage";
	
	public final static int VERIFY_MESSAGE = 17;
	public final static String VERIFY_MESSAGE_NAME = "verifyMessage";
	
	public final static int VERIFY_RESP_MESSAGE = 18;
	public final static String VERIFY_RESP_MESSAGE_NAME = "verifyRespMessage";
	
	public final static int PONG_MESSAGE = 19;
	public final static String PONG_MESSAGE_NAME = "pongMessage";
	
//argement name
	public final static String USER_NAME = "s_username";
	public final static String PASSWORD = "s_password";
	public final static String TARGET = "s_target";
	public final static String CONTENT = "s_content";
	public final static String STATUS = "s_status";
	public final static String ROOM_ID = "s_roomid";
	public final static String ROOM_NAME = "s_roomname";
	public final static String MESSAGE_VERSION = "s_message_version";
	public final static String MESSAGE_ID = "s_message_id";
	public final static String MESSAGE_ARGV = "s_message_argv";
	public final static String IP_S = "s_ip";
	public final static String PORT_S = "s_port";
	public final static String LEASE = "s_lease";
	public final static String MSG = "s_message";
	public final static String CODE = "s_code";
	public final static String LEAVE_USER_NAME = "s_leave_user_name";
	
	
	public final static int SUCCESS = 1;
	public final static int FAILED = 0;
	
//dispatch server configuation argement	
	public final static String DISPATCH_IP = "ip";
	public final static String DISPATCH_PORT = "port";
	public final static String DSP_LOGIN_SERVER_LIST = "login_server_list";
	public final static String DSP_IP = "ip";
	public final static String DSP_PORT = "port";
	public final static String DISP_CONFIG_FILE = "dispatchServer.conf";
	
//login server configuation argement
	public final static String LOGIN_IP = "ip";
	public final static String LOGIN_PORT = "port";
	public final static String LGN_DATA_SERVER_LIST = "data_server_list";
	public final static String LGN_CACHE_SERVER_LIST = "cache_server_list";
	public final static String LGN_LOGIC_SERVER_LIST = "logic_server_list";
	public final static String LGN_IP = "ip";
	public final static String LGN_PORT = "port";
	public final static String LGN_CONFIG_FILE = "loginServer.conf";

//logic server configuration argement
	public final static String LOGIC_IP = "ip";
	public final static String LOGIC_PORT = "port";
	public final static String LGC_DATA_SERVER_LIST = "data_server_list";
	public final static String LGC_CACHE_SERVER_LIST = "cache_server_list";
	public final static String LGC_IP = "ip";
	public final static String LGC_PORT = "port";
	public final static String LGC_CONFIG_FILE = "logicServer.conf";
	
	public final static int PORT = 6978;
	
//user data
	public final static String DATA_USER = "userData";
	public final static String DATA_USERNAME = "userName";
	public final static String DATA_PASSWORD = "password";
	public final static String DATA_ONLINE = "online";
	public final static String DATA_SCORE = "score";
	public final static String DATA_IP = "ip";
	public final static String DATA_PORT = "port";
	public final static String DATA_TIMESTAMP = "timestamp";
	public final static String DATA_VERSION = "version";
	public final static String DATA_TABLE_NAME = "tableName";
	public final static String DATA_VERIFY = "verify";
	
	public final static String DATA_ON = "1";
	public final static String DATA_OFF = "0";
}
